package com.huisenky.smallidea.devalue;

import java.util.HashMap;
import java.util.Map;

public abstract class AbstractTypeValRegistration {

    private final Map<Class<?>, Object> registration = new HashMap<>();

    public abstract Map<Class<?>, Object> register();

    public Map<Class<?>, Object> getTypeVal() {
        // 每次都会putAll 判断 效率低点但是可以extends default用super来实现
        this.registration.putAll(this.register());
        return this.registration;
    }
}
